//
//  PaymentViewController.m
//  JiuLe
//
//  Created by 黄鑫 on 16/8/30.
//  Copyright © 2016年 Fine. All rights reserved.
//

#import "PaymentViewController.h"
#import "RenewalsViewController.h"
#import "RoamingViewController.h"
#import "PaymenHistoryViewController.h"

@interface PaymentViewController ()

@end

@implementation PaymentViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"缴费续费";
    [self showNavgationWithLeftItemWithTitle:@"我的"];
}

#pragma mark - UITableview Delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    if (indexPath.section == 0) {
        if(indexPath.row == 0){
            //费用
            RenewalsViewController *renewals = [[UIStoryboard storyboardWithName:@"PersonalViewController" bundle:nil] instantiateViewControllerWithIdentifier:@"RenewalsViewController"];
            [self.navigationController pushViewController:renewals animated:YES];
        }else if (indexPath.row == 1){
            RoamingViewController *renewals = [[UIStoryboard storyboardWithName:@"PersonalViewController" bundle:nil] instantiateViewControllerWithIdentifier:@"RoamingViewController"];
            [self.navigationController pushViewController:renewals animated:YES];
        }
    }else{
        PaymenHistoryViewController *paymenHistoryVC = [[UIStoryboard storyboardWithName:@"PersonalViewController" bundle:nil] instantiateViewControllerWithIdentifier:@"PaymenHistoryViewController"];
        [self.navigationController pushViewController:paymenHistoryVC animated:YES];
    }

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
